package com.usian.behavior.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 行为微服务调用接口
 */
@FeignClient("leadnews-behavior")
public interface BehaviorFeign {

    /**
     * 根据用户id 设备号 文章id查询 点赞行为、不喜欢行为
     * @param userId  用户id
     * @param equipmentId  设备id
     * @param articleId 文章id
     * @param likeType 点赞类型（文章、动态）
     * @return
     */
    @GetMapping("/api/v1/behavior/findBehavior")
    public Map<String,Boolean> findBehavior(@RequestParam(name = "userId") Integer userId,
                                            @RequestParam(name = "equipmentId") String equipmentId,
                                            @RequestParam(name = "articleId") Long articleId,
                                            @RequestParam(name = "type") Integer likeType);
}
